<%@ page language="java" import="java.util.*,com.wcll.www.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
 <div style="text-align:center;font-size:12px;">
<% 
	if(request.getAttribute("admin")!=null){
 	ArrayList<AdminBean> al = (ArrayList<AdminBean>)request.getAttribute("admin");
 	Iterator<AdminBean> ial = al.iterator();
 	%>
 	<table style="text-align:center;font-size:12px;" border="1">
 		<tr>
 			<td>编号</td>
 			<td>用户名称</td>
 			<td>联系方式</td>
 			<td>ip</td>
 			<td>申请时间</td>
 			<td>基本操作</td>
 			</tr>
 				<% 
 	while(ial.hasNext()){
 	AdminBean ab = new AdminBean();
 	ab = ial.next();
 	%>
 		<tr>
 			<td><%=ab.getId()%></td>
 			<td><%=ab.getAd_name()%></td>
 			<td><%=ab.getPhone() %></td>
 			<td><%=ab.getIp() %></td>
 			<td><%=ab.getCreate_time() %></td>
 			<td><a href ='<%=basePath %>/servlet/AdminServlet?id=<%=ab.getId() %>'>删除</a>&nbsp;|&nbsp;<span style="text-decoration:underline;cursor:hand;" onclick="show(<%=ab.getId()%>)">修改</span></td>
 		</tr>
 		
 	<%}	
}%>
</table>
<div id = "dd" style="display:none;position:absolute;top:200px;left:200px;z-index:10;width:350px;">
	<span style="float:right;cursor:hand;" onClick="hidden();">[&nbsp;关闭&nbsp;]</span>
	<form>
	<input type="hidden" value="" id="md"/>
	<table style="text-align:center;font-size:12px;" border="1">
	<tr>
	<td>用户:</td>
	<td><input type="text" name="ad_name"/></td>
	</tr>
	<tr>
	<td>密码:</td>
	<td><input type="password" name="ad_password"/></td>
	</tr>
	<tr>
	<td>确认密码:</td>
	<td><input type="password" id="ad_password"/></td>
	</tr>
	<tr>
	<td colspan="2" align="center"><input type="submit" value="确认" onClick="hidden();"/></td>
	</tr>
	</table>
	</form>
</div>
</div>
<script src="./includes/ajax.js"></script>
<script>
function show(id){
	var xg = document.getElementById("dd");
	var md = document.getElementById("md");
	md.value=id;
	xg.style.display="block";
	
}
function hidden(){
	var xg = document.getElementById("dd");
	xg.style.display="none";
}
</script>